package com.bai.Mapper;

import com.bai.Pojo.Prisoner;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

public interface PrisonerMapper {

    //添加囚犯
    int addPrisoner(Prisoner prisoner);

    //修改囚犯信息
    int UpdatePrisoner(Prisoner prisoner);

    //查询囚犯（多种查询方法）
    List<Prisoner> QueryAll(@Param("prisex")String prisex,@Param("partition")String partition,@Param("charge")String charge,@Param("offset") int offset, @Param("limit") int limit);

    //根据囚犯ID删除
    int deletePrisonerById(Integer id);
    //根据囚犯姓名删除
    int deletePrisonerByName(String priname);

    //根据囚犯ID查询
    Prisoner queryPrisonerById(Integer id);
    //根据囚犯ID查询推荐介
    Prisoner queryPrisonerDetailsById(Integer id);
    //根据囚犯姓名查询
    Prisoner queryPrisonerByName(String priname);

    //查询所有数量
    int queryAllPriCount(@Param("prisex")String prisex,@Param("partition")String partition,@Param("charge")String charge);

    //多个条件查询


}
